﻿using ModelLayer;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;

namespace WcfServiceLayer.ServiceContracts
{
    [ServiceContract]
    interface IManagementService
    {
        [OperationContract]
        bool AddNewBattery(Battery newBattery, string sessionToken);
        
        [OperationContract]
        bool DeleteBattery(Battery battery, string sessionToken);
                
        [OperationContract]
        bool UpdateBattery(Battery battery, string sessionToken);

        [OperationContract]
        int TryToLendBattery(Battery battery, string sessionToken);

        [OperationContract]
         IList<Battery> GetAllBatteries();

        [OperationContract]
        IList<BatteryType> GetAllBatteryTypes();

        [OperationContract]
        bool AddNewBatteryType(BatteryType type, string sessionToken);

        [OperationContract]
        bool UpdateBatteryType(BatteryType type, string sessionToken);

        [OperationContract]
        bool DeleteBatteryType(BatteryType type, string sessionToken);


        [OperationContract]
        bool AddStation(Station station, string sessionToken); //

        [OperationContract]
        bool UpdateStation(Station station, string sessionToken);

        [OperationContract]
        bool RemoveStation(Station station, string sessionToken);

        [OperationContract]
        IList<Station> GetAllStations();

        [OperationContract]
        Station GetStationById(int stationId);

        [OperationContract]
        IList<UserAccount> GetAllUserAccounts();

        [OperationContract]
        EmployeeAccount LogIn(string username, string password);

        [OperationContract]
        EmployeeAccount ReloadAccount(string sessionToken);

        [OperationContract]
        IList<EmployeeAccount> GetAllEmployeeAccounts();

        [OperationContract]
        bool AddEmployeeAccount(EmployeeAccount account, string sessionToken);

        [OperationContract]
        bool UpdateEmployeeAccount(EmployeeAccount account, string sessionToken);

        [OperationContract]
        bool DeleteEmployeeAccount(EmployeeAccount account, string sessionToken);

        [OperationContract]
        IList<BatteryReservation> GetAllReservations();

        [OperationContract]
        IList<BatteryReservation> GetAllReservationsOnStation(Station station);

        [OperationContract]
        bool UpdateReservation(BatteryReservation reservation, string sessionToken);




    }
}
